public class Test {
    public static void main(String[] args) {
        System.out.println(Swim.NUM);
        //Swim.NUM = 100;//报错，接口中的属性，默认是 public static final
        Shark shark = new Shark();
        shark.swim();
        /*
        Animal[] animals = new Animal[3];
        animals[0] = new Fish();
        animals[1] = new Rabitte();
        animals[2] = new Shark();
        for (Animal animal : animals) {
            animal.eat();
            if (animal instanceof Swim) {
                ((Swim) animal).swim();
            }
        }
        */
    }
}
